package com.realtyManage.springboot.Dao;

import com.realtyManage.springboot.Model.Do.Hulk;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface HulkRepository extends JpaRepository<Hulk,Integer> {

    Page<Hulk> findByType(Pageable pageable, int type);

    @Query("select distinct(type) from Hulk")
    List<String> findDistinctType();
}
